package com.ishowcode.controller;
import com.ishowcode.Service.MQReceiver;
import com.ishowcode.Service.MQSender;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class RabbitMQHandler {
    @Resource
    private MQSender mqSender;
    @RequestMapping("/mq")
    public  void mq(){
        mqSender.send("hello rabbitmq");
    }
    @RequestMapping("/sendExchange")
    public  void sendExchange(){
        mqSender.sendExchange("hello rabbitmq");
    }
    @RequestMapping("/sendDirect1")
    public  void sendDirect1(){
        mqSender.sendDirect1("hello direct");
    }
    @RequestMapping("/sendDirect2")
    public  void sendDirect2(){
        mqSender.sendDirect2("hello rabbitmq");
    }
}
